home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / online / source / cpp / graphics / Conics.sit.hqx / Conics / Class Libraries / Cleanup / Cleanup.h < prev    next >
Text File  |  1996-11-08  |  751b  |  46 lines

  1. //Copyright 1996 Aidan Cully
  2. //All rights reserved
  3.  
  4. #ifndef __CLEANUP_H
  5. #define __CLEANUP_H
  6.  
  7. #include <Types.h>
  8. #include "Queue.h"
  9.  
  10. typedef Boolean (*CleanupProc)( UInt32, void* );
  11.  
  12. enum {
  13.     kSuccess = 0,
  14.     kDuplicateActionErr = 1,
  15.     kActionNotFoundErr = 2,
  16.     kActionLocalErr = 3,
  17.     kCleanupMemErr = 255
  18. };
  19.  
  20. class TCleanup {
  21. protected:
  22.     class ProcType {
  23.     public:
  24.         UInt32 procID;
  25.         CleanupProc theProc;
  26.     };
  27.     class DataType {
  28.     public:
  29.         UInt32 procID;
  30.         void *procData;
  31.     };
  32.     TQueue queue;
  33.     TList procs;
  34. public:
  35.     virtual ~TCleanup();
  36.     UInt8 RegisterDirtyAction( UInt32, CleanupProc );
  37.     UInt8 UnregisterDirtyAction( UInt32 );
  38.     UInt8 NotifyDirty( UInt32, void* );
  39.     UInt8 Clean();
  40. };
  41.  
  42. extern TCleanup mainClean;
  43.  
  44. extern void DrawAlert( unsigned char* );
  45.  
  46. #endif